import java.util.Scanner;

public class cs1 {
    public static void main(String[] args) {
        //键盘录入字符串  统计大，小写。数字出现的次数

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一串字符");
        String line = scanner.next();
        System.out.println(line);

        int bigCount = 0;        //统计大写
        int smallCount = 0;//统计小写
        int numCount = 0;//统计数字

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            if (c >= 'A' && c <= 'Z') {
                bigCount++;
            }
            if (c >= 'a' && c <= 'z') {
                smallCount++;
            }
            if (c >= '0' && c <= '9') {
                numCount++;
            }
        }
        System.out.println("大写出现的次数"+bigCount);
        System.out.println("小写出现的次数"+smallCount);
        System.out.println("数字出现的次数"+numCount);
    }
}
